package cn.jhc.teachingquality.net;

import android.util.Log;

import com.android.volley.Response;
import com.android.volley.VolleyError;

import static cn.jhc.teachingquality.Global.LOG_TAG;
/**
 * Created by luyanfei on 16-3-9.
 */
public class DefaultResponseErrorListener implements Response.ErrorListener {
    @Override
    public void onErrorResponse(VolleyError error) {
        error.printStackTrace();
        if(error.networkResponse != null) {
            Log.w(LOG_TAG, "Status code: " + error.networkResponse.statusCode);
            Log.w(LOG_TAG, "Network roundtrip time: " + error.networkResponse.networkTimeMs);
        }
    }
}
